How to redirect [Authorize] to loginUrl only when Roles are not used?
Posted
by Bob
on Stack Overflow
See other posts from Stack Overflow
or by Bob
Published on 2010-03-24T02:11:16Z
Indexed on
2010/03/24
2:13 UTC
Read the original article
Hit count: 583
asp.net-mvc
I'd like [Authorize]
to redirect to loginUrl unless I'm also using a role, such as [Authorize (Roles="Admin")]
. In that case, I want to simply display a page saying the user isn't authorized.
What should I do?
© Stack Overflow or respective owner